import axios from "axios";
const getListData = (dispatch, getState) => {
    dispatch({
        type: "loading"
    })
    const { page } = getState()
    axios.get(`https://cnodejs.org/api/v1/topics?page=${page}&limit=5`)
        .then(res => {
            dispatch({
                type: "update",
                list: res.data.data
            })
        })
}
export { getListData };
